package com.may.wind.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.persistence.*;

/**
 * 用户角色信息
 */
@Entity
@Table(name = "users_roles")
@JsonIgnoreProperties({"handler", "hibernateLazyInitializer"})
@ApiModel(description = "用户角色信息")
public class UserRole {
    @Id
    @SequenceGenerator(sequenceName = "user_role_sequence", name = "sequence_user_roles", allocationSize = 1)
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequence_user_roles")
    @Column(name = "id")
    @ApiModelProperty(name = "id", value = "ID", required = true)
    long id;

    @Column(name = "user_id")
    @ApiModelProperty(name = "userId", value = "用户ID", required = true)
    long userId;

    @Column(name = "roles_id")
    @ApiModelProperty(name = "rolesId", value = "角色ID", required = true)
    long rolesId;

    public long getId() {
        return id;
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public long getRolesId() {
        return rolesId;
    }

    public void setRolesId(long rolesId) {
        this.rolesId = rolesId;
    }
}
